<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        ul,
        li {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        li {
            padding-left: 1em;
            border: 1px dotted black;
            /* 设置下边框和左边框 */
            border-width: 0 0 1px 1px;
        }

        li.container {
            
            border-bottom: 0px;
        }

        li.empty {
            font-style: italic;
            color: silver;
            border-color: silver;
        }

        li p {
            margin: 0;
            background: white;
            position: relative;
            top: 0.5em;
        }

        li ul {
            border-top: 1px dotted black;
            margin-left: -1em;
            padding-left: 2em;
        }

        ul li:last-child ul {
            border-left: 1px solid blue;
            margin-left: -17px;
        }
    </style>
</head>

<body>
    <ul>
        <li class="container">
            <p>Testing </p>
            <ul>
                <li>
                    <p>Testing 1</p>
                </li>
                <li>
                    <p>Testing 2</p>
                </li>
                <li class="container">
                    <p>Testing </p>
                    <ul>
                        <li>
                            <p>Testing 1</p>
                        </li>
                        <li>
                            <p>Testing 2</p>
                        </li>
                        <li class="container">
                            <p>Testing 3</p>
                            <ul>
                                <li>
                                    <p>grandson1</p>
                                </li>
                                <li>
                                    <p>grandson2</p>
                                </li>
                                <li>
                                    <p>grandson3</p>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </li>
            </ul>
        </li>
        <li class="container">
            <p>Testing </p>
            <ul>
                <li>
                    <p>Testing 1</p>
                </li>
                <li>
                    <p>Testing 2</p>
                </li>
                <li>
                    <p>Testing 3</p>
                </li>
            </ul>
        </li>
        <li class="container">
            <p>Testing </p>
            <ul>
                <li class="empty">
                    <p>empty</p>
                </li>
            </ul>
        </li>
    </ul>

</body>

</html>